﻿	<div id="sidebar" class="sidebars">
		<ul>
			<li>
				<h2 class="widgettitle">Bài ngẫu nhiên</h2>
				<div class="randomPosts">
					<ul>
						<?php 
						$randomPosts = new WP_Query();
						$randomPosts->query('showpost=5&orderby=rand');
						while($randomPosts->have_posts()):$randomPosts->the_post()?>
						<li>
							<?php $thumb = get_post_meta($post->ID,'hình đại diện',true);?>
							<img src="<?php bloginfo('stylesheet_directory')?>/timthumb.php?src=<?php echo $thumb;?>&amp;h=60;&amp;w=60;zc=1" alt="avatar"/>
							<p><a href="<?php the_permalink();?>"><?php the_title();?></a></p>
						</li>
						<?php endwhile; ?>
					</ul>
				</div>
			</li>
		<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ){
			?>
			<?
			} else { ?>	                        
			            
		<?php } ?>
        </ul>
	</div>

